<?php if ($this->getModel()->isEnabled()): ?>
    <div class="block block-newarrival">
        <div class="block-title">
            <strong><span>
                <?php echo $this->getModel()->getSidebarTitle() ?>
             </span></strong>
        </div>
        <div class="block-content">
<?php $_products = $this->getProductCollection(); ?>
        <?php if (sizeof($_products)): ?>
            <ol class="mini-products-list" id="newarrival-sidebar">
        <?php $i = 0;
            foreach ($_products->getItems() as $_product): ?>
            <?php $i++; ?>
            <?php if ($_product->getData('is_salable')): ?>
                    <li class="item<?php if ($i == sizeof($_products)): ?> last<?php endif; ?>">
                            <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'thumbnail')->resize(50); ?>" width="50" height="50" alt="" /></a>
                            <div class="product-details">
                                <p class="product-name"><a href="<?php echo $this->getProductUrl($_product) ?>"><?php echo $this->htmlEscape($_product->getName()) ?></a></p>
                    <?php if (Mage::getStoreConfig($this->XML_ZHISHIDI_NEWARRIVAL_CONFIG_PATH . 'sidebar_price')): ?>
                    <?php echo $this->getPriceHtml($_product, true) ?>
                    <?php endif; ?>
                    <?php if (Mage::getStoreConfig($this->XML_ZHISHIDI_NEWARRIVAL_CONFIG_PATH . 'sidebar_actions')): ?>
                                <a class="link-cart" href="<?php echo $this->getAddToCartUrl($_product) ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>"><?php echo $this->__('Add to Cart') ?></a>
                    <?php endif; ?>
                            </div>
                        </li>
            <?php endif; ?>
            <?php endforeach; ?>
                            </ol>
        <?php endif; ?>
             </div>
      </div>
<?php endif; ?>